﻿using DtoFw.Query;
using DtoFw.Result;

namespace DtoFw.Interface
{
    public interface IUser
    {
        /// <summary>
        /// 登陆
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [Api(Router = "user/login")]
        BaseGenericResult<MainUserLoginInfo> Login(MainUserLoginQuery query);
        /// <summary>
        /// token刷新
        /// </summary>
        /// <param name="refreshtoken"></param>
        /// <returns></returns>
        [Api(Router = "refreshtoken/{params}")]
        BaseGenericResult<string> RefreshToken(string refreshtoken);
        /// <summary>
        /// 获取当前登陆用户信息
        /// </summary>
        /// <returns></returns>
        [Api(Router = "get")]
        BaseGenericResult<MainUserLoginResult> GetLoginUserInfo();
        /// <summary>
        /// 获取用户分页列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [Api(Router = "pager")]
        BaseGenericResult<Pager<UserinfoResult>> QueryUserList(UserInfoQuery query);
        /// <summary>
        /// 新增用户
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        [Api(Router = "post")]
        BaseResult Post(UserInfoAddInfo info);
        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        [Api(Router = "put")]
        BaseResult Put(UserInfoEditInfo info);
        /// <summary>
        /// 获取指定用户
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [Api(Router = "get/{params}/user")]
        BaseGenericResult<UserInfoEditInfo> GetUserInfo(long id);
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [Api(Router = "put/pwd")]
        BaseResult PutPassWord(PutPwdQuery query);
        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [Api(Router = "rest/pwd")]
        BaseResult RestPassWord(RestPwdQuery query);
        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [Api(Router = "delete")]
        BaseResult Delete(DeleteDto query);
    }
}
